<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设置边距</title>
  <style type="text/css">
    .border{border:solid 5px pink;}
    img{
      padding: 80px 80px 0;
        margin: 0 50px 0 30px;
    }
    p{
      padding:5%;
        text-indent: 2em;
    }
  </style>
</head>
<body>
<img class="border" src="images/timg.jpg" alt="内边距" width="500">
<p >段落内边距为父元素宽度的5%。</p>
</body>
</html>